package com.zlfund.cat.zjgsmk.api;

import com.zlfund.cat.zjgsmk.bean.ActivityBean;
import com.zlfund.cat.zjgsmk.bean.BaseBean;
import com.zlfund.cat.zjgsmk.bean.HomeBean;
import com.zlfund.cat.zjgsmk.bean.SocialBean;
import com.zlfund.cat.zjgsmk.bean.StartUpAdBean;
import com.zlfund.cat.zjgsmk.bean.UserBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by chenj
 * Created on 2017/8/15
 */

public class ZjgsmkService {
    public interface LoginService{
        @POST("n08")
        Observable<UserBean> login(@QueryMap Map<String,Object> map);
    }

    public interface ZGetStartAdService{
        @POST("n100")
        Observable<StartUpAdBean> getAdInfo();
    }

    public interface ChannelHomeService{
        @FormUrlEncoded
        @POST("n36")
        Observable<HomeBean> getChannelHomeInfo(@Field("auth")String field);
    }

    public interface ActivityInfoService{
        @POST("n23")
        Observable<ActivityBean> getActivityInfo(@Query("page")String page);
    }

    public interface ChannelDetailService{
        @FormUrlEncoded
        @POST("n15")
        Observable<SocialBean> getChannelData(@FieldMap Map<String,String> map);
    }

    public interface NewDynamicService{
        @Multipart
        @POST("j12")
        Call<ResponseBody> upload(@Part MultipartBody.Part file,
                                  @Part("title") RequestBody title,
                                  @Part("auth") RequestBody auth,
                                  @Part("label") RequestBody label,
                                  @Part("content") RequestBody content);

    }
}
